﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using KeMei.Common;

public partial class AboutUs_AboutUs : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            string strId = Request["Id"];
            if (strId != null && !string.IsNullOrEmpty(strId.Trim()))
            {
                try
                {
                    int id = Convert.ToInt32(strId);

                    KeMei.BLL.AboutUs bll = new KeMei.BLL.AboutUs();
                    KeMei.Model.AboutUs info = bll.GetModel(" (LmId=" + id + ")");

                    if (info != null)
                    {
                        divContent.InnerHtml = info.TContent;
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show(this, ex.Message);
                }
            }
            else
            {
                string strWhere = " lmID In(Select Top 1 Id From SysLm Where ParentId = 4 Order By Id asc)";
                KeMei.BLL.AboutUs bll = new KeMei.BLL.AboutUs();
                KeMei.Model.AboutUs info = bll.GetModel(strWhere);

                if (info != null)
                {
                    divContent.InnerHtml = info.TContent;
                }
            }
        }
    }
}